package com.ruoyi.web.controller.system;

import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.SysProjects;
import com.ruoyi.system.service.ISysProjectsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 部门表(Projects)表控制层
 *
 * @author makejava
 * @since 2021-03-28 16:10:25
 */
@RestController
@RequestMapping
public class SysProjectsController {
    /**
     * 服务对象
     */
    private final ISysProjectsService iSysProjectsService;

    @Autowired
    public SysProjectsController(ISysProjectsService iSysProjectsService) {
        this.iSysProjectsService = iSysProjectsService;
    }

    @PostMapping("/createProject")
    public AjaxResult createProject(@RequestBody SysProjects sysProjects) {
        iSysProjectsService.insert(sysProjects);
        return new AjaxResult(HttpStatus.SUCCESS, "创建成功");
    }
}